<%@ page  contentType="text/html; charset=UTF-8"%>
<%@ include file="../../public/public.jsp" %>

<% int rowColor = 1; 
	int pageSize = ((Integer)valueStack.findValue("pageForm.pageSize")).intValue();
	int pageNo = ((Integer)valueStack.findValue("pageForm.pageNo")).intValue();
	int rowNo = (pageNo-1)*pageSize+1;
%>
    <table  cellspacing="1" class="dataTableStyle"> 
    	<thead>
    	<s:if test="pagePosition.toLowerCase().equals('top') || pagePosition.toLowerCase().equals('all')">
    		<tr bgcolor="#FFFFFF">
    		
    			<td colspan="20">
    				<ss:page value="pageForm"></ss:page>
    			</td>
    		</tr>
    		</s:if>
    		<tr>
    			<th align="center" width=5%">序号</th>
				<th align="center" width="20%">软件名称</th>
				<th align="center" width="14%">著作权人</th>
				<th align="center" width="12%">登记号</th>
				<th align="center" width="12%">证书号</th>							    			
				<th align="center" width="12%">首次发表时间</th>
				<ss:condition rescode="OwnSoftware" optcode="PRINT||GLOBAL">
    			<th align="center" width="15%">报送单位</th>
    			</ss:condition>
    			<ss:condition rescode="OwnSoftware" optcode="UPDATE||DELETE">
				<th align="center" width="10%">操作</th>
				</ss:condition>
    		</tr>
    	</thead>
    	<tbody>
    		<s:set name="yearflag" value=""></s:set>
    		<s:iterator value="data">
    		<% if((rowColor++ %2)==0){ %>
    		<tr class="data_tr_bgcs1" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    		<%}else{ %>
    		<tr class="data_tr_bgcs2" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    		<%} %>
			
				<s:if test="belongYear!=#yearflag">
    			<s:set name="yearflag" value="belongYear"></s:set>
    				<td colspan="8" class="yearTDStyle">&nbsp;&nbsp;<s:property value="belongYear"/>年</td>
    				</tr>
    				<% rowNo=1;
    				if((rowColor++ %2)==0){ %>
    					<tr class="data_tr_bgcs1" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    				<%}else{ %>
    					<tr class="data_tr_bgcs2" onmouseover="changeRowColor(this)" onmouseout="resumeRowColor(this,<%=rowColor%2 %>)">
    				<%} %>
    			</s:if>
    			<td align="center">
    			<%=rowNo++ %>
    			</td>
    			<td align="center">
    			<a href='javascript:lookView(<s:property value="id"/>)' style="cusor:hand">
    				<s:property value="reportName"/>
    			</a>
    			</td>
    			<td><s:property value="author"/></td>
    			<td><s:property value="recordCode"/></td>
    			<td><s:property value="bookCode"/></td>
    			<td>
    			<s:date name="firstPublishDate" format="yyyy-MM-dd"/>
    			</td>
    				<ss:condition rescode="OwnSoftware" optcode="PRINT||GLOBAL">
    				<td align="center"><s:property value="sentDepName"/></td>
    			</ss:condition>
    			<ss:condition rescode="OwnSoftware" optcode="UPDATE||DELETE">
    			<td align="center">
    				<ss:condition rescode="OwnSoftware" optcode="UPDATE">
						<a href="javascript:goUpdate(<s:property value="id"/>)">[修改]</a>
					</ss:condition>
    				<ss:condition rescode="OwnSoftware" optcode="DELETE">
						<a href="javascript:del(<s:property value="id"/>)">[删除]</a>
					</ss:condition>
    			</td>
					</ss:condition>
    			
    		 </tr>
    		</s:iterator>
    	</tbody>
		<tfoot>
    	<s:if test="pagePosition.toLowerCase().equals('buttom') || pagePosition.toLowerCase().equals('all')">
    		<tr class="dataList_pageForm_style">
    			<td colspan="20">
    				<ss:page value="pageForm"></ss:page>
    			</td>
    		</tr>
    		</s:if>
    	</tfoot>
    </table>